A typical printing environment includes a source or host device such as a computer. The source device provides image or object information data to a printing device. The printing device may include a laser printer, an ink-jet printer, a thermal printer, a facsimile device, and/or a copier.
In a typical printing process, the source device or computer generates a print ready file through an application such as Photo-Paint® by the Corel Corporation or Photo Shop® by the Adobe Corporation, often in combination with a printer driver. The print ready file defines a printed page using a page description language (PDL). Examples of PDLs include Postscript® by the Adobe Corporation and printer command language (PCL®) by the Hewlett-Packard Corporation. The print ready file, also known as a PDL file, describes a page's margins and spacing; placement of graphics; margins and spacing; fonts and text; and shading and colors.
In certain applications, a raster image processor (RIP) device or a language parser receives the PDL file. The RIP device or language parser typically is part of the printing device. The RIP device or language parser may include a processor and memory. The processor receives the PDL file and processes the PDL file to construct a page image. The page image is stored in the memory of the RIP device or language parser. The complexity of the PDL file as well as the characteristics of the print engine determines the processor and memory requirements. Some printers, particularly low memory laser printers, employ a technique known as “racing” to avoid storing the entire page image at once.
The page image is fed to a print engine, where the print engine physically images the page onto media such as a sheet. A page description typically is built in two steps. First, during formatting by the RIP or language parser, the PDL file is converted into a series of commands called display commands which describe what must be printed. The display commands for a printing device typically include such objects as color commands that describe a particular color that is to be printed, vectors that indicate position on the media sheet, the color to be rendered, raster images, and font glyphs. Second, the display commands are sorted according to their vertical position on the page and are assigned to “page strips.” Each page strip stores the display commands in a “display list.” Although horizontal strips are discussed, other page tiling techniques can be used.
After display lists have been created for every page strip, the page strips are ready to be rasterized and passed to a print engine. At such time, the page strips are processed, typically but not limited to, in the order in which they will be sent to the print engine. For each page strip, the commands on the display list are parsed and sent to the rasterization module. At this point the rasterized strip may be sent to the print engine for immediate printing, or may be compressed and stored for later printing. The operation used by some printing technologies (e.g. laser printers) is such that each page strip must arrive in a very narrow time window from the previous page strip. Therefore compression of page strips is typically performed, with later decompression and printing of all page strips. This reduces the time dependency to the decompression of a fixed size page strip rather than the rasterization of an arbitrarily complex display list. Compression condenses the page strips into more manageable streams of information. Typically, lossy compression is used, where portions of the information contained in the page strips are lost during compression. Lossy compression algorithms used for images are generally visually lossless. In other words, the user does not notice a degraded image caused by loss of certain data. Unfortunately, in other cases, the degradation of a reproduced image using a lossy compression algorithm is quite noticeable. With usual lossy compression algorithms this typically occurs when very high compression ratios are used to store the image in very little memory.
The compressed page strip is then compared to a threshold to determine whether the compressed page strip fits in available resources. If the compressed page strip does not fit, it is “recompressed.” Recompression involves decompressing the page strip, then compressing the page strip using a lower quality level. The recompression process repeats until the threshold is met. At a later point in the rendering of a page, limited printer resources (e.g., memory) may require saving space. If space must be saved, recompression of one or more of the page strips must take place. Recompression of all page strips is often desirable to assure that all page strips have the same quality level.
Recompressing which involves decompressing then compressing takes a relatively long time. In addition, lossy compressing using lower quality levels drops data, resulting in degraded images. To avoid recompression, often a printer is set up for a low threshold value. This way the chances are higher the image will fit under the threshold and avoid running out of memory later. In many instances the threshold value is set lower than necessary, resulting in a lower quality page than could have been printed.
Therefore, there is a need to process page strips and render a page, without the need to continually perform recompression when printer resources such as memory are low, and provide the best quality image with the resources provided by the printer.